import { $axios } from '@/utils/http';

// 获取评价表
export async function allEvaluate(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/evaluate/allEvaluate',
    method: 'GET',
    params,
  });
}

// 商家获取评价表
export async function allEvaluateByCompany(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/evaluate/allEvaluateByCompany',
    method: 'GET',
    params,
  });
}
// 买家回复
export async function addNewContent(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/evaluate/addNewContent',
    method: 'POST',
    params,
  });
}

// 商家回复
export async function addSaleContent(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/evaluate/addSaleContent',
    method: 'POST',
    params,
  });
}

// 根据id获取数据
export async function selectByOrderId(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/evaluate/selectByOrderId',
    method: 'GET',
    params,
  });
}

// 删除评论
export async function removeEvaluate(params?: RecordItem) {
  return $axios.request({
    url: 'http://localhost:8090/dyh/evaluate/removeEvaluate',
    method: 'POST',
    params,
  });
}
